Leach’s storm-petrels (again)

  • Nocturnal
  • Very vocal on colonies at night

Acoustic Monitoring

- Breeding colonies are loud! - How much vocal activity is attributable to pre-breeders?

Study Site

Data Processing

Great Black-Backed Gull

Atlantic Puffin

Leach’s storm-petrel

Sampling scheme

  • Recorder captures the first twenty minutes of every hour between sunrise and sunset
  • I count the number of Leach’s storm-petrel calls in each recording (count data)

Scientific Question

What are some factors that affect Leach’s storm-petrel call frequency at a non-colony island?

Variables

Variable Symbol Type Role Factor Type Nested/Crossed?
Number of calls C Ratio (count) Response NA Crossed
Wind speed Ws Ratio Explanatory Fixed Crossed
Background Noise BN Interval Explanatory Random Crossed
Light levels L Ratio (kind of) Explanatory Fixed Crossed
Time since sunset Ti Interval Explanatory Fixed Crossed
Moon illumination Mo Percentage Explanatory Fixed Crossed

Hypotheses

Wind speed: The number of calls decreases as wind speed increases

Background noise: The number of calls decreases as background noise increases (because I will have missed calls in the recordings)

Light levels: The number of calls increases as darkness (MPSAS) increases (aka as light decreases)

Time since sunset: The number of calls increases as time since sunset increases

Moon illumination: The number of calls decreases as moon illumination increases (petrels avoid full moons)

Graphical Model

Formal Model

\[ C = \beta_0 + \beta_{Ws}Ws + \beta_{Bn}Bn + \beta_{L}L + \beta_{Ti}Ti + \beta_{Mo}Mo + \]

\[ \beta_{Ws * Bn}Ws * Bn + \beta_{Ws * L}WS * L + \beta_{Ws * Ti}WS * Ti + \beta_{Ws * Mo}WS * Mo + \]

\[ \beta_{Bn * L}Bn * L + \beta_{Bn * Ti}Bn * Ti + \beta_{Bn * Mo}Bn * Wo + \beta_{L * Ti}L * Ti + \]

\[ \beta_{L * Mo}L * Mo + \beta_{Ti * Mo}Ti * Mo+ \beta_{WS * Bn * L * Ti * Mo}WS * Bn * L * Ti * Mo + \epsilon \]

Df: 17 left over for the error term

Are the predictor variables overly correlated?

Are the predictor variables overly correlated? cont.

data <- data %>% 
  select(n_calls, datetime, wind_speed, background_noise, moonillumination, light_reading_MSAS, time_since_sunset)

as.data.frame(round(cor(x = data[c(3,4,5,6,7)]), digits = 2))
                   wind_speed background_noise moonillumination
wind_speed               1.00             0.08             0.20
background_noise         0.08             1.00            -0.36
moonillumination         0.20            -0.36             1.00
light_reading_MSAS       0.05            -0.09            -0.06
time_since_sunset       -0.07            -0.10            -0.08
                   light_reading_MSAS time_since_sunset
wind_speed                       0.05             -0.07
background_noise                -0.09             -0.10
moonillumination                -0.06             -0.08
light_reading_MSAS               1.00              0.89
time_since_sunset                0.89              1.00

Time since sunset and light levels are correlated!

We already know that LESPs are most active at certain times of night…

Leach’s storm-petrel and herring gull vocal activity, from Collins (2021)

…And I’m much more interested in how light levels affect behaviour, so I’ll drop time from the model.

New Formal Model

\[ C = \beta_0 + \beta_{Ws}Ws + \beta_{Bn}Bn + \beta_{L}L + \]

\[ \beta_{Mo}Mo + \beta_{Ws * Bn}Ws * Bn + \beta_{Ws * L}WS * L + \beta_{Ws * Mo}WS * Mo + \]

\[ \beta_{Bn * L}Bn * L + \beta_{Bn * Mo}Bn * Wo + \beta_{L * Mo}L * Mo + \]

\[ \beta_{WS * Bn * L * Mo}WS * Bn * L * Mo + \epsilon \]

Interaction effects?

Analysis of Deviance Table

Model: gaussian, link: identity

Response: n_calls

Terms added sequentially (first to last)

                                                                Df Deviance
NULL                                                                       
moonillumination                                                 1    21393
wind_speed                                                       1     2467
background_noise                                                 1    54769
light_reading_MSAS                                               1      991
moonillumination:wind_speed                                      1     2632
moonillumination:background_noise                                1    41171
moonillumination:light_reading_MSAS                              1     1027
wind_speed:background_noise                                      1     4557
wind_speed:light_reading_MSAS                                    1       47
background_noise:light_reading_MSAS                              1       53
moonillumination:wind_speed:background_noise                     1     3450
moonillumination:wind_speed:light_reading_MSAS                   1        8
moonillumination:background_noise:light_reading_MSAS             1     2964
wind_speed:background_noise:light_reading_MSAS                   1       50
moonillumination:wind_speed:background_noise:light_reading_MSAS  1       10
                                                                Resid. Df
NULL                                                                   34
moonillumination                                                       33
wind_speed                                                             32
background_noise                                                       31
light_reading_MSAS                                                     30
moonillumination:wind_speed                                            29
moonillumination:background_noise                                      28
moonillumination:light_reading_MSAS                                    27
wind_speed:background_noise                                            26
wind_speed:light_reading_MSAS                                          25
background_noise:light_reading_MSAS                                    24
moonillumination:wind_speed:background_noise                           23
moonillumination:wind_speed:light_reading_MSAS                         22
moonillumination:background_noise:light_reading_MSAS                   21
wind_speed:background_noise:light_reading_MSAS                         20
moonillumination:wind_speed:background_noise:light_reading_MSAS        19
                                                                Resid. Dev
NULL                                                                195419
moonillumination                                                    174026
wind_speed                                                          171559
background_noise                                                    116790
light_reading_MSAS                                                  115799
moonillumination:wind_speed                                         113167
moonillumination:background_noise                                    71996
moonillumination:light_reading_MSAS                                  70969
wind_speed:background_noise                                          66412
wind_speed:light_reading_MSAS                                        66365
background_noise:light_reading_MSAS                                  66312
moonillumination:wind_speed:background_noise                         62862
moonillumination:wind_speed:light_reading_MSAS                       62854
moonillumination:background_noise:light_reading_MSAS                 59889
wind_speed:background_noise:light_reading_MSAS                       59840
moonillumination:wind_speed:background_noise:light_reading_MSAS      59829
                                                                      F
NULL                                                                   
moonillumination                                                 6.7936
wind_speed                                                       0.7835
background_noise                                                17.3928
light_reading_MSAS                                               0.3148
moonillumination:wind_speed                                      0.8357
moonillumination:background_noise                               13.0747
moonillumination:light_reading_MSAS                              0.3262
wind_speed:background_noise                                      1.4471
wind_speed:light_reading_MSAS                                    0.0150
background_noise:light_reading_MSAS                              0.0169
moonillumination:wind_speed:background_noise                     1.0955
moonillumination:wind_speed:light_reading_MSAS                   0.0027
moonillumination:background_noise:light_reading_MSAS             0.9414
wind_speed:background_noise:light_reading_MSAS                   0.0157
moonillumination:wind_speed:background_noise:light_reading_MSAS  0.0033
                                                                   Pr(>F)    
NULL                                                                         
moonillumination                                                0.0173444 *  
wind_speed                                                      0.3871267    
background_noise                                                0.0005191 ***
light_reading_MSAS                                              0.5812832    
moonillumination:wind_speed                                     0.3720757    
moonillumination:background_noise                               0.0018407 ** 
moonillumination:light_reading_MSAS                             0.5746190    
wind_speed:background_noise                                     0.2437686    
wind_speed:light_reading_MSAS                                   0.9038019    
background_noise:light_reading_MSAS                             0.8978139    
moonillumination:wind_speed:background_noise                    0.3083811    
moonillumination:wind_speed:light_reading_MSAS                  0.9593293    
moonillumination:background_noise:light_reading_MSAS            0.3441195    
wind_speed:background_noise:light_reading_MSAS                  0.9015045    
moonillumination:wind_speed:background_noise:light_reading_MSAS 0.9547663    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

moon illumination x background noise is significant! Is it meaningful?

From the summary table:

Term Estimate Std. Error t value Pr
moonillumination:background_noise 1.021e+00 1.595e+00 0.640 0.530

Effect size is trivial, so we can drop the interaction terms from the model.

New formal model:

\[ C = \beta_0 + \beta_{Ws}Ws + \beta_{Bn}Bn + \beta_{L}L + \beta_{Mo}Mo + \epsilon \]

Are the data overdispersed?

var(data$n_calls)/mean(data$n_calls)
[1] 168.1995

Yep!

Negative binomial distribution

Fit model

nb_model <- MASS::glm.nb(data = data, n_calls ~ moonillumination + wind_speed + background_noise + light_reading_MSAS)
Warning: glm.fit: algorithm did not converge
Warning: glm.fit: algorithm did not converge
Warning: glm.fit: algorithm did not converge
Warning: glm.fit: algorithm did not converge
Warning: glm.fit: algorithm did not converge
Warning: glm.fit: algorithm did not converge
Warning: glm.fit: algorithm did not converge
Warning: glm.fit: algorithm did not converge
Warning: glm.fit: algorithm did not converge
Warning: glm.fit: algorithm did not converge
Warning: glm.fit: algorithm did not converge
Warning in MASS::glm.nb(data = data, n_calls ~ moonillumination + wind_speed +
: alternation limit reached

Evaluate Model

These look good, but I don’t like that warning message…

Evaluate Evidence (Quasipoisson)

Analysis of Deviance Table

Model: quasipoisson, link: log

Response: n_calls

Terms added sequentially (first to last)

                   Df Deviance Resid. Df Resid. Dev       F    Pr(>F)    
NULL                                  34     3310.7                      
moonillumination    1   682.36        33     2628.4 25.0033 2.328e-05 ***
wind_speed          1    78.22        32     2550.2  2.8661    0.1008    
background_noise    1  1665.72        31      884.4 61.0361 1.020e-08 ***
light_reading_MSAS  1   167.16        30      717.3  6.1252    0.0192 *  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

\[ G = \Delta Deviance \]

\[ LR = e^{G/2} \]

\[ LR (all\space terms) = e^{(3310.7-717.3)/2} = 1.41E563 \]

Can this actually be right?

LR a different way

\[ LR = (1 - R^2)^{-n/2} \]

deviance <- summary(call_model_qpoisson)$deviance
null_deviance <- summary(call_model_qpoisson)$null.deviance
rsquared <- 1 - (deviance / null_deviance)


print(rsquared)
[1] 0.7833472

\[ (1 - 0.7833)^{-35/2} = 4.19E11 \]

Why the difference?

Likelihood of individual terms

\[ LR = (\dfrac{SS_{term} + SS_{residual}} {SS_{residual}})^{n/2} \]

Term SS LR P
moon illumination 21392.62 19.43 2.328e-05**
wind speed 2467.30 1.45 0.1008
background noise 54768.56 877.71 1.020e-08**
light reading 991.41 1.16 0.0192*

residual SS: 115799.1

Parameter Estimates (Quasipoisson)


Call:
glm(formula = n_calls ~ moonillumination + wind_speed + background_noise + 
    light_reading_MSAS, family = quasipoisson(link = "log"), 
    data = data)

Coefficients:
                   Estimate Std. Error t value Pr(>|t|)    
(Intercept)        10.29609    2.07348   4.966 2.57e-05 ***
moonillumination    0.10574    0.01886   5.606 4.21e-06 ***
wind_speed          0.14789    0.51128   0.289   0.7744    
background_noise    0.30432    0.04655   6.537 3.14e-07 ***
light_reading_MSAS  0.05939    0.02449   2.425   0.0215 *  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for quasipoisson family taken to be 27.29071)

    Null deviance: 3310.73  on 34  degrees of freedom
Residual deviance:  717.28  on 30  degrees of freedom
AIC: NA

Number of Fisher Scoring iterations: 6
  • Remember that background noise is inverse
  • Larger light readings represent darker skies

Does anything improve if we look at calls/minute instead of number of calls?

data <- data %>% 
  mutate(calls_minute = n_calls/20)

var(data$calls_minute)/mean(data$calls_minute)
[1] 8.409974

Fit Model

calls_minute_qp <- glm(data = data, calls_minute ~ moonillumination + wind_speed + background_noise + light_reading_MSAS, family = quasipoisson(link="log"))

Evaluate Model

Residuals are almost identical

Evidence (calls per minute)

Term SS LR P
moon illumination 53.48 19.43 4.21e-06**
wind speed 6.168 1.45 0.7744
background noise 136.92 877.71 3.14e-07**
light reading 2.47 1.16 0.0215*

Residual SS: 289.497

The likelihood ratios are exactly the same! But the p-values have changed.

Full Model Evidence (calls per minute)

deviance <- summary(calls_minute_qp)$deviance
null_deviance <- summary(calls_minute_qp)$null.deviance
rsquared <- 1 - (deviance / null_deviance)


print(rsquared)
[1] 0.7833472

Where:

\[ LR = (1 - R^2)^{-n/2} \]

\[ LR = 4.19E11 \]

This LR is the same as for the model with count data

Where:

\[ LR = e^{G/2} \]

\[ LR = 1.439E28 \]

…Why would this be the only LR to change when looking at calls per minute instead of call counts?

Calls per minute model ANODEV table

Analysis of Deviance Table

Model: quasipoisson, link: log

Response: calls_minute

Terms added sequentially (first to last)

                   Df Deviance Resid. Df Resid. Dev       F    Pr(>F)    
NULL                                  34    165.537                      
moonillumination    1   34.118        33    131.419 25.0049 2.326e-05 ***
wind_speed          1    3.911        32    127.508  2.8663    0.1008    
background_noise    1   83.286        31     44.222 61.0402 1.020e-08 ***
light_reading_MSAS  1    8.358        30     35.864  6.1256    0.0192 *  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Acknowledgements

  • Project supervised by David Wilson
  • Fieldwork help: Chris Ward, Sabina Wilhelm, Gill Holmes